Patch level : 2.0 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento : Corretta gestione cambio studio (usato solamente da BA0) Eliminato sfarfallamento da barre di progresso Ricorretta centratura sheet git-svn-id: svn://10.65.10.50/trunk@11113 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
11b36f4bf2
commit
b4689f75e6
@ -1051,6 +1051,9 @@ bool TPrefix::set_studio(const char* study, long ditta)
|
||||
if (!dirtest.exist())
|
||||
return FALSE;
|
||||
|
||||
// Chiudi tutti i files!
|
||||
_manager.close_all();
|
||||
|
||||
const TString old_study(__ptprf);
|
||||
const TString old_firm(_prefix);
|
||||
|
||||
|
@ -26,7 +26,7 @@ word TIndwin::measure_text(TToken_string& s, word& maxlen) const
|
||||
|
||||
// Certified 70%
|
||||
TIndwin::TIndwin(long max, const char* txt, bool cancel, bool bar, int div)
|
||||
: _text(NULL), _cancel(NULL), _progress(NULL), _bar(0),
|
||||
: _text(NULL), _cancel(NULL), _bar(0),
|
||||
_status(0L), _max(max), _flags(0x0)
|
||||
{
|
||||
if (_max <= 0)
|
||||
@ -49,9 +49,6 @@ TIndwin::TIndwin(long max, const char* txt, bool cancel, bool bar, int div)
|
||||
{
|
||||
RCT r; _text->get_rect(r);
|
||||
_bar = r.bottom + CHARY;
|
||||
|
||||
if (CAMPI_SCAVATI)
|
||||
_progress = new TText_control(win(), DLG_NULL, 1, lines+3, hor-2, 1, "", "");
|
||||
}
|
||||
|
||||
if (cancel)
|
||||
@ -95,7 +92,6 @@ TIndwin::~TIndwin()
|
||||
close_modal();
|
||||
|
||||
if (_cancel) delete _cancel;
|
||||
if (_progress) delete _progress;
|
||||
if (_text) delete _text;
|
||||
}
|
||||
|
||||
@ -123,7 +119,7 @@ RCT* TIndwin::get_bar_rct(RCT& r) const
|
||||
r.left += CHARX;
|
||||
r.right -= CHARX;
|
||||
r.top = _bar;
|
||||
r.bottom = r.top + ROWY; // 3*CHARY/2;
|
||||
r.bottom = r.top + ROWY;
|
||||
return &r;
|
||||
}
|
||||
|
||||
@ -170,7 +166,7 @@ void TIndwin::update_bar()
|
||||
|
||||
if (prc > 0)
|
||||
{
|
||||
const unsigned long elapsed_time = (clock() - _start_time)/1000;
|
||||
const unsigned long elapsed_time = (clock() - _start_time)/CLOCKS_PER_SEC;
|
||||
const unsigned long total_time = (unsigned long)(elapsed_time / prc);
|
||||
unsigned long ss = total_time - elapsed_time;
|
||||
const unsigned long hh = ss / 3600;
|
||||
@ -178,8 +174,17 @@ void TIndwin::update_bar()
|
||||
const unsigned long mm = ss / 60;
|
||||
ss -= mm *60;
|
||||
TString80 n;
|
||||
n.format("%d%% - Tempo residuo stimato %02lu:%02lu:%02lu", int(prc*100.0+0.5), hh, mm, ss);
|
||||
_progress->set_caption(n);
|
||||
n.format(FR("%d%% - Tempo residuo stimato %02lu:%02lu:%02lu"), int(prc*100.0+0.5), hh, mm, ss);
|
||||
|
||||
b = r;
|
||||
b.top = b.bottom+2;
|
||||
b.bottom = b.top + CHARY;
|
||||
|
||||
CBRUSH brush; brush.pat = PAT_SOLID; brush.color = MASK_BACK_COLOR;
|
||||
xvt_dwin_set_cbrush(w, &brush);
|
||||
xvt_dwin_set_std_cpen(w, TL_PEN_HOLLOW);
|
||||
xvt_dwin_draw_rect(w, &b);
|
||||
xvt_dwin_draw_text(w, r.left, r.bottom+CHARY, n, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -36,8 +36,6 @@ class TIndwin : public TWindow
|
||||
TField_control* _text;
|
||||
// @cmember:(INTERNAL) Bottone "Annulla"
|
||||
TControl* _cancel;
|
||||
// @cmember:(INTERNAL) Testo della percentuale
|
||||
TControl* _progress;
|
||||
// @cmember:(INTERNAL) Movimento della barra e percentuale
|
||||
int _bar;
|
||||
// @cmember:(INTERNAL) ora inizio elaborazione
|
||||
|
@ -279,11 +279,12 @@ TSheet_control::TSheet_control(
|
||||
if (width < cli.right)
|
||||
{
|
||||
RCT out; xvt_vobj_get_outer_rect(parent, &out);
|
||||
cli.left = (cli.right - width) / 2;
|
||||
cli.right = cli.left + width;
|
||||
cli.top += out.top; // cli had left = 0 and top = 0
|
||||
cli.bottom += out.top;
|
||||
xvt_vobj_move(parent, &cli);
|
||||
RCT rct;
|
||||
rct.left = out.left + (cli.right - width) / 2;
|
||||
rct.right = rct.left + width;
|
||||
rct.top = out.top; // cli had left = 0 and top = 0
|
||||
rct.bottom = rct.top + cli.bottom;
|
||||
xvt_vobj_move(parent, &rct);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user