mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-28 13:04:25 -04:00
Fix another issue with station details not being saved
Due to what appears to be a Qt bug, any in progress user edit to a table fields is not updated in the underlying data models until QDialog::accept() is called, this means that model validation before calling QDialog::accept() is tricky. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5164 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+2
-3
@@ -119,7 +119,6 @@ StationList::StationList (Bands const * bands, Stations stations, QObject * pare
|
||||
: QSortFilterProxyModel {parent}
|
||||
, m_ {bands, stations, parent}
|
||||
{
|
||||
// setDynamicSortFilter (true);
|
||||
setSourceModel (&*m_);
|
||||
setSortRole (SortRole);
|
||||
}
|
||||
@@ -134,9 +133,8 @@ StationList& StationList::operator = (Stations stations)
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto StationList::stations () -> Stations
|
||||
auto StationList::stations () const -> Stations
|
||||
{
|
||||
submit ();
|
||||
return m_->stations ();
|
||||
}
|
||||
|
||||
@@ -432,6 +430,7 @@ bool StationList::impl::setData (QModelIndex const& model_index, QVariant const&
|
||||
|
||||
case 2:
|
||||
stations_[row].antenna_description_ = value.toString ();
|
||||
qDebug () << "stations edited:" << stations_;
|
||||
Q_EMIT dataChanged (model_index, model_index, roles);
|
||||
changed = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user