grigory-lobkov / rtsp-camera-view

View IP-camera RTSP in grid, auto bandwidth, full-screen, command line support
Apache License 2.0
201 stars 46 forks source link

Dragging between sources in one window #23

Closed Reddds closed 5 years ago

Reddds commented 5 years ago

При перемещении мышью между 2 источниками в окне с целью их перестановки, параметр "position" становится -1.

When swap sources on window by mouse "position" of them save as -1;

Тут меняется Position public void SourceDoneDragDrop() { //... if (tp != null) { if (fp != null) { int p = fp.Position; **fp.Position = tp.Position; tp.Position = p;** View.SwapItems(fp.Control, tp.Control); if (_draggedSource != null) tp.Source = null; } else if (_draggedSource != null) tp.Source = _draggedSource; } _draggedSource = null; }

_source.position reset to -1

private int _position; public int Position { get => _position; set { _position = value; if (_source != null) **_source.position = -1;** } }

И при сохранении настроек сохраняется -1. И при повторном открытии программы эти свапнутые источники уже не отображаются.

grigory-lobkov commented 5 years ago

Thank's for such a descriptive explanation of error! fixed in 1.0.2 release Can you try it ? :)

P.S. I did set { _position = value; if (_source != null) _source.position = value; }