mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-10 09:19:01 +00:00
Store the filename only in the Dfn value.
This commit is contained in:
parent
c4a9db12f9
commit
21da4da0fa
1 changed files with 11 additions and 1 deletions
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
#include "nel/georges/form_dfn.h"
|
#include "nel/georges/form_dfn.h"
|
||||||
|
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
enum EntryEnum
|
enum EntryEnum
|
||||||
|
@ -248,7 +250,15 @@ void DFNBrowserCtrl::onEnumValueChanged( QtProperty *p, int v )
|
||||||
void DFNBrowserCtrl::onFileValueChanged( QtProperty *p, const QString &v )
|
void DFNBrowserCtrl::onFileValueChanged( QtProperty *p, const QString &v )
|
||||||
{
|
{
|
||||||
NLGEORGES::CFormDfn::CEntry &entry = m_dfn->getEntry( m_idx );
|
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 );
|
Q_EMIT valueChanged( p->propertyName(), v );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue