mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
Store the filename only in the Dfn value.
This commit is contained in:
parent
403df9d1ed
commit
8add268df1
1 changed files with 11 additions and 1 deletions
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "nel/georges/form_dfn.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace
|
||||
{
|
||||
enum EntryEnum
|
||||
|
@ -248,7 +250,15 @@ void DFNBrowserCtrl::onEnumValueChanged( QtProperty *p, int v )
|
|||
void DFNBrowserCtrl::onFileValueChanged( QtProperty *p, const QString &v )
|
||||
{
|
||||
NLGEORGES::CFormDfn::CEntry &entry = m_dfn->getEntry( m_idx );
|
||||
entry.setFilename( v.toUtf8().constData() );
|
||||
QFileInfo info( v );
|
||||
if( !info.exists() )
|
||||
return;
|
||||
|
||||
entry.setFilename( info.fileName().toUtf8().constData() );
|
||||
|
||||
blockSignals( true );
|
||||
m_fileMgr->setValue( p, info.fileName() );
|
||||
blockSignals( false );
|
||||
|
||||
Q_EMIT valueChanged( p->propertyName(), v );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue