Browse Source

refs #795 Syncronizing with release commit:4b9ae8fd86c260f024f089e8cee7794013f7997e build:201802281955.

git-svn-id: https://help.cyberplat.com/svn@707 03a3ef96-f0a9-4432-b0b0-a3692ed642c1
tags/3.11.0
svn 3 years ago
parent
commit
f3e0bd2237
5 changed files with 23 additions and 13 deletions
  1. +3
    -0
      3.0/src/interface/modern/edit_payment_scene.qml
  2. +2
    -1
      3.0/src/interface/modern/scene_with_context/operators/11611/widgets/kzd_enum_editor.qml
  3. +10
    -4
      3.0/src/interface/modern/scripts/editor_factory.js
  4. +2
    -2
      3.0/src/modules/GraphicsEngine/src/GraphicsEngine.cpp
  5. +6
    -6
      3.0/src/modules/Hardware/Common/src/Polling/PollingExpector.cpp

+ 3
- 0
3.0/src/interface/modern/edit_payment_scene.qml View File

@@ -181,6 +181,9 @@ Widgets.SceneBase2 {
else if (aEvent === "update_fields") {
Editor.updateFields(aParameters.fields)
}
else if (aEvent === "reset_fields") {
Editor.updateFields(aParameters.fields, true)
}
else if (aEvent === Scenario.Payment.Event.HIDUpdated) {
var hidFields = {};



+ 2
- 1
3.0/src/interface/modern/scene_with_context/operators/11611/widgets/kzd_enum_editor.qml View File

@@ -167,7 +167,8 @@ Item {
global.timeInWay = Number(ticket.timeInWay.split(":")[0])
global.timeInWay = global.timeInWay ? global.timeInWay : 1 // Скорректируем до часа

GUI.notify("update_fields", {fields: [{"id": "wo_bedding", "behavior": "readonly", "default_value": "1"}]});
GUI.notify("update_fields", {fields: [{"id": "wo_bedding", "behavior": "readonly"}]});
GUI.notify("reset_fields", {fields: [{"id": "wo_bedding"}]});

//ticket.type=3 плацкарт
// Время в пути больше суток кодируется количество_суток.оставшиеся_часы


+ 10
- 4
3.0/src/interface/modern/scripts/editor_factory.js View File

@@ -63,7 +63,7 @@ function popFields()
}

//------------------------------------------------------------------------------
function updateFields(aFields)
function updateFields(aFields, aReset)
{
var $ = []

@@ -80,12 +80,18 @@ function updateFields(aFields)
for (var i in $) {
for (var k in aFields) {
if ($[i].id == aFields[k].id) {

if (aReset !== undefined && aReset) {
delete values[$[i].id]
continue
}

for (var p in aFields[k]) {
if (p == "id") continue
if (p == "id") {
continue
}

log("@updateFields", $[i][p], aFields[k][p])
$[i][p] = aFields[k][p]
log("@@updateFields", $[i][p], aFields[k][p])
}
}
}


+ 2
- 2
3.0/src/modules/GraphicsEngine/src/GraphicsEngine.cpp View File

@@ -1,4 +1,4 @@
/* @file Графический интерфейс. */
/* @file Графический интерфейс. */


// Qt
@@ -444,7 +444,7 @@ void GraphicsEngine::notify(const QString & aEvent, const QVariantMap & aParamet
mTopWidget->graphics->notify(aEvent, aParameters);
}
toLog(LogLevel::Normal, QString("NOTIFY '%1'. Parameters: %2").arg(w->info.name).arg(formatParams(aParameters)));
toLog(LogLevel::Debug, QString("NOTIFY '%1'. Parameters: %2").arg(w->info.name).arg(formatParams(aParameters)));
}

//---------------------------------------------------------------------------


+ 6
- 6
3.0/src/modules/Hardware/Common/src/Polling/PollingExpector.cpp View File

@@ -49,9 +49,9 @@ void ExpectorWorkingThread::process(TBoolMethod aOnPoll, TBoolMethod aCondition,
//--------------------------------------------------------------------------------
void ExpectorWorkingThread::onPoll()
{
bool result = mOnPoll._Empty() || mOnPoll();
bool result = !mOnPoll || mOnPoll();

if ((!result && mPollingSensible) || (!mErrorCondition._Empty() && mErrorCondition()))
if ((!result && mPollingSensible) || (mErrorCondition && mErrorCondition()))
{
emit finished(false);

@@ -99,26 +99,26 @@ bool PollingExpector::wait(std::function<bool()> aOnPoll, TBoolMethod aCondition
{
mResult = false;

if (aCondition._Empty())
if (!aCondition)
{
return false;
}

bool OK = aCondition();
bool error = !aErrorCondition._Empty() && aErrorCondition();
bool error = aErrorCondition && aErrorCondition();

if (OK || error)
{
return OK && !error;
}

if (!aOnPoll._Empty() && !aOnPoll() && aPollingSensible)
if (aOnPoll && !aOnPoll() && aPollingSensible)
{
return false;
}

OK = aCondition();
error = !aErrorCondition._Empty() && aErrorCondition();
error = aErrorCondition && aErrorCondition();

if (OK || error)
{


Loading…
Cancel
Save